/**
 * Copyright (C), 2015-2019, XXX有限公司
 * FileName: BridgeClient
 * Author:   zhouheng
 * Date:     2019/5/2 21:53
 * Description: 桥接模式客户端
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.zhouh.patterns.com.zhouh.structure.bridge;

import com.zhouh.patterns.com.zhouh.structure.bridge.bag.BagAbstraction;
import com.zhouh.patterns.com.zhouh.structure.bridge.bag.BigBag;
import com.zhouh.patterns.com.zhouh.structure.bridge.material.Material;
import com.zhouh.patterns.com.zhouh.structure.bridge.material.Paper;

/**
 * 〈对象每个属性可能存在多种类型，将属性抽离，进行嫁接〉<br>
 * 〈桥接模式客户端〉
 *
 * @author zhouheng
 * @create 2019/5/2
 * @since 1.0.0
 */
public class BridgeClient {
    public static void main(String[] args){
        // 袋子材质
        Material material = new Paper();
        // 袋子型号
        BagAbstraction bigBag = new BigBag();

        bigBag.setMaterial(material);

        // 采摘开始
        bigBag.pick();
    }
}